package pkmn.move;

import java.util.Random;
import pkmn.battle.BattlePokemon;
import pkmn.status.BattleStatusEnum;
import pkmn.util.Util;

public class ApplyWrap extends IndirectAction {

    @Override
    public void execute(BattlePokemon battlePokemon) {

        //verify if already wrapped
        if (battlePokemon.haveBattleStatus(BattleStatusEnum.wrap)) {
            return;
        }
        //set status
        battlePokemon.setBattleStatus(BattleStatusEnum.wrap, new Random().nextInt(4) + 2);
        Util.printAndWait(battlePokemon + " was wrapped!");
    }
}
